package com.cha.chaCommon.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("baby_info_table")
public class BabyInfo {
    /**
     * 孩子id，设置为自增主键，无需手动添加
     */
    @TableId(type = IdType.AUTO)
    private Long babyId;
    /**
     * 性别，数据库中存的是枚举类型:男,女
     */
    private String gender;
    /**
     * 孩子名字
     */
    private String name;
    /**
     * 出生日期
     */
    private LocalDate birthDate;
    /**
     * 创建时间
     */
    private LocalDate createTime;
    /**
     * 更新时间
     */
    private LocalDate updateTime;
    /**
     * 家长id
     */
    private Long parentsId;
    /**
     * 家庭id
      */
    private Integer familyId;


    public BabyInfo(Long babyId, String s, String s1, LocalDate localDate, LocalDate now, LocalDate now1, long l) {

        this.babyId = babyId;
        this.gender = s;
        this.name = s1;
        this.birthDate = localDate;
        this.createTime = now;
        this.updateTime = now1;
        this.parentsId = l;
        this.familyId = (int) l;

    }
}